3.4.73 \(\int \cos ^5(c+d x) (a+a \sec (c+d x))^{3/2} (B \sec (c+d x)+C \sec ^2(c+d x)) \, dx\) [373]

Optimal. Leaf size=209 \[ \frac {a^{3/2} (75 B+88 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{64 d}+\frac {a^2 (75 B+88 C) \sin (c+d x)}{64 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (75 B+88 C) \cos (c+d x) \sin (c+d x)}{96 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d} \]

[Out]

1/64*a^(3/2)*(75*B+88*C)*arctan(a^(1/2)*tan(d*x+c)/(a+a*sec(d*x+c))^(1/2))/d+1/64*a^2*(75*B+88*C)*sin(d*x+c)/d
/(a+a*sec(d*x+c))^(1/2)+1/96*a^2*(75*B+88*C)*cos(d*x+c)*sin(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+1/24*a^2*(9*B+8*C)
*cos(d*x+c)^2*sin(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+1/4*a*B*cos(d*x+c)^3*sin(d*x+c)*(a+a*sec(d*x+c))^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.38, antiderivative size = 209, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4157, 4102, 4100, 3890, 3859, 209} \begin {gather*} \frac {a^{3/2} (75 B+88 C) \text {ArcTan}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{64 d}+\frac {a^2 (75 B+88 C) \sin (c+d x)}{64 d \sqrt {a \sec (c+d x)+a}}+\frac {a^2 (9 B+8 C) \sin (c+d x) \cos ^2(c+d x)}{24 d \sqrt {a \sec (c+d x)+a}}+\frac {a^2 (75 B+88 C) \sin (c+d x) \cos (c+d x)}{96 d \sqrt {a \sec (c+d x)+a}}+\frac {a B \sin (c+d x) \cos ^3(c+d x) \sqrt {a \sec (c+d x)+a}}{4 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^5*(a + a*Sec[c + d*x])^(3/2)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

(a^(3/2)*(75*B + 88*C)*ArcTan[(Sqrt[a]*Tan[c + d*x])/Sqrt[a + a*Sec[c + d*x]]])/(64*d) + (a^2*(75*B + 88*C)*Si
n[c + d*x])/(64*d*Sqrt[a + a*Sec[c + d*x]]) + (a^2*(75*B + 88*C)*Cos[c + d*x]*Sin[c + d*x])/(96*d*Sqrt[a + a*S
ec[c + d*x]]) + (a^2*(9*B + 8*C)*Cos[c + d*x]^2*Sin[c + d*x])/(24*d*Sqrt[a + a*Sec[c + d*x]]) + (a*B*Cos[c + d
*x]^3*Sqrt[a + a*Sec[c + d*x]]*Sin[c + d*x])/(4*d)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 3859

Int[Sqrt[csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[-2*(b/d), Subst[Int[1/(a + x^2), x], x, b*(C
ot[c + d*x]/Sqrt[a + b*Csc[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 3890

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[a*Cot[e
 + f*x]*((d*Csc[e + f*x])^n/(f*n*Sqrt[a + b*Csc[e + f*x]])), x] + Dist[a*((2*n + 1)/(2*b*d*n)), Int[Sqrt[a + b
*Csc[e + f*x]]*(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && LtQ[n, -2
^(-1)] && IntegerQ[2*n]

Rule 4100

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(
B_.) + (A_)), x_Symbol] :> Simp[A*b^2*Cot[e + f*x]*((d*Csc[e + f*x])^n/(a*f*n*Sqrt[a + b*Csc[e + f*x]])), x] +
 Dist[(A*b*(2*n + 1) + 2*a*B*n)/(2*a*d*n), Int[Sqrt[a + b*Csc[e + f*x]]*(d*Csc[e + f*x])^(n + 1), x], x] /; Fr
eeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[A*b*(2*n + 1) + 2*a*B*n, 0] &&
LtQ[n, 0]

Rule 4102

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[a*A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x]
- Dist[b/(a*d*n), Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Simp[a*A*(m - n - 1) - b*B*n - (a*
B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2
 - b^2, 0] && GtQ[m, 1/2] && LtQ[n, -1]

Rule 4157

Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(
x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.), x_Symbol] :> Dist[1/b^2, Int[(a + b*Csc[e + f*x])
^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m,
 n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]

Rubi steps

\begin {align*} \int \cos ^5(c+d x) (a+a \sec (c+d x))^{3/2} \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx &=\int \cos ^4(c+d x) (a+a \sec (c+d x))^{3/2} (B+C \sec (c+d x)) \, dx\\ &=\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {1}{4} \int \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \left (\frac {1}{2} a (9 B+8 C)+\frac {1}{2} a (5 B+8 C) \sec (c+d x)\right ) \, dx\\ &=\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {1}{48} (a (75 B+88 C)) \int \cos ^2(c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^2 (75 B+88 C) \cos (c+d x) \sin (c+d x)}{96 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {1}{64} (a (75 B+88 C)) \int \cos (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^2 (75 B+88 C) \sin (c+d x)}{64 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (75 B+88 C) \cos (c+d x) \sin (c+d x)}{96 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}+\frac {1}{128} (a (75 B+88 C)) \int \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {a^2 (75 B+88 C) \sin (c+d x)}{64 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (75 B+88 C) \cos (c+d x) \sin (c+d x)}{96 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}-\frac {\left (a^2 (75 B+88 C)\right ) \text {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{64 d}\\ &=\frac {a^{3/2} (75 B+88 C) \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{64 d}+\frac {a^2 (75 B+88 C) \sin (c+d x)}{64 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (75 B+88 C) \cos (c+d x) \sin (c+d x)}{96 d \sqrt {a+a \sec (c+d x)}}+\frac {a^2 (9 B+8 C) \cos ^2(c+d x) \sin (c+d x)}{24 d \sqrt {a+a \sec (c+d x)}}+\frac {a B \cos ^3(c+d x) \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{4 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
time = 12.53, size = 1031, normalized size = 4.93 \begin {gather*} a \left (\frac {C \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)} (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))}}{2 \sqrt {2} d}-\frac {C (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))} \left (\sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)}+\sin \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {3}{2} (c+d x)\right )-\sin \left (\frac {5}{2} (c+d x)\right )\right )}{16 d}+\frac {C (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))} \left (-3 \sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)}+7 \sin \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {3}{2} (c+d x)\right )+3 \sin \left (\frac {5}{2} (c+d x)\right )+2 \sin \left (\frac {7}{2} (c+d x)\right )\right )}{96 d}-\frac {B (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {a (1+\sec (c+d x))} \left (3 \sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)}+5 \sin \left (\frac {1}{2} (c+d x)\right )-16 \sin \left (\frac {3}{2} (c+d x)\right )-9 \sin \left (\frac {5}{2} (c+d x)\right )-8 \sin \left (\frac {7}{2} (c+d x)\right )-6 \sin \left (\frac {9}{2} (c+d x)\right )\right )}{768 d}+\frac {3 B (1+\cos (c+d x)) \, _2F_1\left (\frac {1}{2},3;\frac {3}{2};1-\sec (c+d x)\right ) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a (1+\sec (c+d x))} \tan (c+d x)}{4 d (1+\sec (c+d x))}+\frac {B (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\tanh ^{-1}\left (\sqrt {1-\sec (c+d x)}\right )+\cos (c+d x) \sqrt {1-\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \tan (c+d x)}{4 d \sqrt {1+\sec (c+d x)} \sqrt {-\tan ^2(c+d x)}}+\frac {3 C (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (\tanh ^{-1}\left (\sqrt {1-\sec (c+d x)}\right )+\cos (c+d x) \sqrt {1-\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \tan (c+d x)}{8 d \sqrt {1+\sec (c+d x)} \sqrt {-\tan ^2(c+d x)}}+\frac {B (1+\cos (c+d x)) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {a (1+\sec (c+d x))} \left (\sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {1+\sec (c+d x)} \left (-3 \sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)}+7 \sin \left (\frac {1}{2} (c+d x)\right )-2 \sin \left (\frac {3}{2} (c+d x)\right )+3 \sin \left (\frac {5}{2} (c+d x)\right )+2 \sin \left (\frac {7}{2} (c+d x)\right )\right )+\frac {12 \left (\tanh ^{-1}\left (\sqrt {1-\sec (c+d x)}\right )+\cos (c+d x) \sqrt {1-\sec (c+d x)}\right ) \tan (c+d x)}{\sqrt {-\tan ^2(c+d x)}}\right )}{96 d \sqrt {1+\sec (c+d x)}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^5*(a + a*Sec[c + d*x])^(3/2)*(B*Sec[c + d*x] + C*Sec[c + d*x]^2),x]

[Out]

a*((C*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Sqrt[Cos[c + d*x]]*(1 + Cos[c + d*x])*Sec[c/2 + (d*x)/2]^2*Sec[(c + d*x
)/2]*Sqrt[a*(1 + Sec[c + d*x])])/(2*Sqrt[2]*d) - (C*(1 + Cos[c + d*x])*Sec[c/2 + (d*x)/2]^2*Sec[(c + d*x)/2]*S
qrt[a*(1 + Sec[c + d*x])]*(Sqrt[2]*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Sqrt[Cos[c + d*x]] + Sin[(c + d*x)/2] - 2*
Sin[(3*(c + d*x))/2] - Sin[(5*(c + d*x))/2]))/(16*d) + (C*(1 + Cos[c + d*x])*Sec[c/2 + (d*x)/2]^2*Sec[(c + d*x
)/2]*Sqrt[a*(1 + Sec[c + d*x])]*(-3*Sqrt[2]*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Sqrt[Cos[c + d*x]] + 7*Sin[(c + d
*x)/2] - 2*Sin[(3*(c + d*x))/2] + 3*Sin[(5*(c + d*x))/2] + 2*Sin[(7*(c + d*x))/2]))/(96*d) - (B*(1 + Cos[c + d
*x])*Sec[c/2 + (d*x)/2]^2*Sec[(c + d*x)/2]*Sqrt[a*(1 + Sec[c + d*x])]*(3*Sqrt[2]*ArcSin[Sqrt[2]*Sin[(c + d*x)/
2]]*Sqrt[Cos[c + d*x]] + 5*Sin[(c + d*x)/2] - 16*Sin[(3*(c + d*x))/2] - 9*Sin[(5*(c + d*x))/2] - 8*Sin[(7*(c +
 d*x))/2] - 6*Sin[(9*(c + d*x))/2]))/(768*d) + (3*B*(1 + Cos[c + d*x])*Hypergeometric2F1[1/2, 3, 3/2, 1 - Sec[
c + d*x]]*Sec[c/2 + (d*x)/2]^2*Sqrt[a*(1 + Sec[c + d*x])]*Tan[c + d*x])/(4*d*(1 + Sec[c + d*x])) + (B*(1 + Cos
[c + d*x])*Sec[c/2 + (d*x)/2]^2*(ArcTanh[Sqrt[1 - Sec[c + d*x]]] + Cos[c + d*x]*Sqrt[1 - Sec[c + d*x]])*Sqrt[a
*(1 + Sec[c + d*x])]*Tan[c + d*x])/(4*d*Sqrt[1 + Sec[c + d*x]]*Sqrt[-Tan[c + d*x]^2]) + (3*C*(1 + Cos[c + d*x]
)*Sec[c/2 + (d*x)/2]^2*(ArcTanh[Sqrt[1 - Sec[c + d*x]]] + Cos[c + d*x]*Sqrt[1 - Sec[c + d*x]])*Sqrt[a*(1 + Sec
[c + d*x])]*Tan[c + d*x])/(8*d*Sqrt[1 + Sec[c + d*x]]*Sqrt[-Tan[c + d*x]^2]) + (B*(1 + Cos[c + d*x])*Sec[c/2 +
 (d*x)/2]^2*Sqrt[a*(1 + Sec[c + d*x])]*(Sec[(c + d*x)/2]*Sqrt[1 + Sec[c + d*x]]*(-3*Sqrt[2]*ArcSin[Sqrt[2]*Sin
[(c + d*x)/2]]*Sqrt[Cos[c + d*x]] + 7*Sin[(c + d*x)/2] - 2*Sin[(3*(c + d*x))/2] + 3*Sin[(5*(c + d*x))/2] + 2*S
in[(7*(c + d*x))/2]) + (12*(ArcTanh[Sqrt[1 - Sec[c + d*x]]] + Cos[c + d*x]*Sqrt[1 - Sec[c + d*x]])*Tan[c + d*x
])/Sqrt[-Tan[c + d*x]^2]))/(96*d*Sqrt[1 + Sec[c + d*x]]))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(762\) vs. \(2(185)=370\).
time = 26.83, size = 763, normalized size = 3.65

method result size
default \(-\frac {\left (-225 B \left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}-264 C \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )-675 B \left (\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}-792 C \sqrt {2}\, \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )-675 B \cos \left (d x +c \right ) \sin \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {2}-792 C \sqrt {2}\, \sin \left (d x +c \right ) \cos \left (d x +c \right ) \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right )-225 B \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )-264 C \sqrt {2}\, \left (-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}\right )^{\frac {7}{2}} \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sin \left (d x +c \right )+768 B \left (\cos ^{8}\left (d x +c \right )\right )+1152 B \left (\cos ^{7}\left (d x +c \right )\right )+1024 C \left (\cos ^{7}\left (d x +c \right )\right )+480 B \left (\cos ^{6}\left (d x +c \right )\right )+1792 C \left (\cos ^{6}\left (d x +c \right )\right )+1200 B \left (\cos ^{5}\left (d x +c \right )\right )+1408 C \left (\cos ^{5}\left (d x +c \right )\right )-3600 B \left (\cos ^{4}\left (d x +c \right )\right )-4224 C \left (\cos ^{4}\left (d x +c \right )\right )\right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, a}{3072 d \cos \left (d x +c \right )^{3} \sin \left (d x +c \right )}\) \(763\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^5*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

-1/3072/d*(-225*B*cos(d*x+c)^3*sin(d*x+c)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+c
os(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))*2^(1/2)-264*C*2^(1/2)*sin(d*x+c)*cos(d*x+c)^3*(-2*cos(d*x+c)/
(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))-675*B*co
s(d*x+c)^2*sin(d*x+c)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*si
n(d*x+c)/cos(d*x+c)*2^(1/2))*2^(1/2)-792*C*2^(1/2)*sin(d*x+c)*cos(d*x+c)^2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2
)*arctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))-675*B*cos(d*x+c)*sin(d*x+c)*
(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^
(1/2))*2^(1/2)-792*C*2^(1/2)*sin(d*x+c)*cos(d*x+c)*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*
x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))-225*B*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(7/2)*2^(1/2)*a
rctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))*sin(d*x+c)-264*C*2^(1/2)*(-2*co
s(d*x+c)/(1+cos(d*x+c)))^(7/2)*arctanh(1/2*(-2*cos(d*x+c)/(1+cos(d*x+c)))^(1/2)*sin(d*x+c)/cos(d*x+c)*2^(1/2))
*sin(d*x+c)+768*B*cos(d*x+c)^8+1152*B*cos(d*x+c)^7+1024*C*cos(d*x+c)^7+480*B*cos(d*x+c)^6+1792*C*cos(d*x+c)^6+
1200*B*cos(d*x+c)^5+1408*C*cos(d*x+c)^5-3600*B*cos(d*x+c)^4-4224*C*cos(d*x+c)^4)*(a*(1+cos(d*x+c))/cos(d*x+c))
^(1/2)/cos(d*x+c)^3/sin(d*x+c)*a

________________________________________________________________________________________

Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="maxima")

[Out]

Timed out

________________________________________________________________________________________

Fricas [A]
time = 2.46, size = 396, normalized size = 1.89 \begin {gather*} \left [\frac {3 \, {\left ({\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right ) + {\left (75 \, B + 88 \, C\right )} a\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (48 \, B a \cos \left (d x + c\right )^{4} + 8 \, {\left (15 \, B + 8 \, C\right )} a \cos \left (d x + c\right )^{3} + 2 \, {\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right )^{2} + 3 \, {\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{384 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, -\frac {3 \, {\left ({\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right ) + {\left (75 \, B + 88 \, C\right )} a\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (48 \, B a \cos \left (d x + c\right )^{4} + 8 \, {\left (15 \, B + 8 \, C\right )} a \cos \left (d x + c\right )^{3} + 2 \, {\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right )^{2} + 3 \, {\left (75 \, B + 88 \, C\right )} a \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{192 \, {\left (d \cos \left (d x + c\right ) + d\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="fricas")

[Out]

[1/384*(3*((75*B + 88*C)*a*cos(d*x + c) + (75*B + 88*C)*a)*sqrt(-a)*log((2*a*cos(d*x + c)^2 - 2*sqrt(-a)*sqrt(
(a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)*sin(d*x + c) + a*cos(d*x + c) - a)/(cos(d*x + c) + 1)) + 2*(48
*B*a*cos(d*x + c)^4 + 8*(15*B + 8*C)*a*cos(d*x + c)^3 + 2*(75*B + 88*C)*a*cos(d*x + c)^2 + 3*(75*B + 88*C)*a*c
os(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c) + d), -1/192*(3*((75*B + 88
*C)*a*cos(d*x + c) + (75*B + 88*C)*a)*sqrt(a)*arctan(sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(sqr
t(a)*sin(d*x + c))) - (48*B*a*cos(d*x + c)^4 + 8*(15*B + 8*C)*a*cos(d*x + c)^3 + 2*(75*B + 88*C)*a*cos(d*x + c
)^2 + 3*(75*B + 88*C)*a*cos(d*x + c))*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c))/(d*cos(d*x + c) +
d)]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**5*(a+a*sec(d*x+c))**(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)**2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1088 vs. \(2 (185) = 370\).
time = 2.10, size = 1088, normalized size = 5.21 \begin {gather*} -\frac {3 \, {\left (75 \, B \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 88 \, C \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right ) - 3 \, {\left (75 \, B \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 88 \, C \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right ) + \frac {4 \, \sqrt {2} {\left (225 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{14} B \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 264 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{14} C \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 6261 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{12} B \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 4008 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{12} C \sqrt {-a} a^{3} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 35925 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{10} B \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 33960 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{10} C \sqrt {-a} a^{4} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 127449 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{8} B \sqrt {-a} a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 131784 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{8} C \sqrt {-a} a^{5} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 101667 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} B \sqrt {-a} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 108312 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} C \sqrt {-a} a^{6} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 26079 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} B \sqrt {-a} a^{7} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 29432 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} C \sqrt {-a} a^{7} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 3303 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} B \sqrt {-a} a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + 3384 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} C \sqrt {-a} a^{8} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 147 \, B \sqrt {-a} a^{9} \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - 152 \, C \sqrt {-a} a^{9} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left ({\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )}^{4}}}{384 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^5*(a+a*sec(d*x+c))^(3/2)*(B*sec(d*x+c)+C*sec(d*x+c)^2),x, algorithm="giac")

[Out]

-1/384*(3*(75*B*sqrt(-a)*a*sgn(cos(d*x + c)) + 88*C*sqrt(-a)*a*sgn(cos(d*x + c)))*log(abs((sqrt(-a)*tan(1/2*d*
x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2 - a*(2*sqrt(2) + 3))) - 3*(75*B*sqrt(-a)*a*sgn(cos(d*x + c
)) + 88*C*sqrt(-a)*a*sgn(cos(d*x + c)))*log(abs((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^
2 + a))^2 + a*(2*sqrt(2) - 3))) + 4*sqrt(2)*(225*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)
^2 + a))^14*B*sqrt(-a)*a^2*sgn(cos(d*x + c)) + 264*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*
c)^2 + a))^14*C*sqrt(-a)*a^2*sgn(cos(d*x + c)) - 6261*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1
/2*c)^2 + a))^12*B*sqrt(-a)*a^3*sgn(cos(d*x + c)) - 4008*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x
+ 1/2*c)^2 + a))^12*C*sqrt(-a)*a^3*sgn(cos(d*x + c)) + 35925*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*
d*x + 1/2*c)^2 + a))^10*B*sqrt(-a)*a^4*sgn(cos(d*x + c)) + 33960*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(
1/2*d*x + 1/2*c)^2 + a))^10*C*sqrt(-a)*a^4*sgn(cos(d*x + c)) - 127449*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a
*tan(1/2*d*x + 1/2*c)^2 + a))^8*B*sqrt(-a)*a^5*sgn(cos(d*x + c)) - 131784*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqr
t(-a*tan(1/2*d*x + 1/2*c)^2 + a))^8*C*sqrt(-a)*a^5*sgn(cos(d*x + c)) + 101667*(sqrt(-a)*tan(1/2*d*x + 1/2*c) -
 sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^6*B*sqrt(-a)*a^6*sgn(cos(d*x + c)) + 108312*(sqrt(-a)*tan(1/2*d*x + 1/2*
c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^6*C*sqrt(-a)*a^6*sgn(cos(d*x + c)) - 26079*(sqrt(-a)*tan(1/2*d*x + 1
/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4*B*sqrt(-a)*a^7*sgn(cos(d*x + c)) - 29432*(sqrt(-a)*tan(1/2*d*x
+ 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^4*C*sqrt(-a)*a^7*sgn(cos(d*x + c)) + 3303*(sqrt(-a)*tan(1/2*d*
x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*B*sqrt(-a)*a^8*sgn(cos(d*x + c)) + 3384*(sqrt(-a)*tan(1/2*
d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*C*sqrt(-a)*a^8*sgn(cos(d*x + c)) - 147*B*sqrt(-a)*a^9*sg
n(cos(d*x + c)) - 152*C*sqrt(-a)*a^9*sgn(cos(d*x + c)))/((sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x
+ 1/2*c)^2 + a))^4 - 6*(sqrt(-a)*tan(1/2*d*x + 1/2*c) - sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a))^2*a + a^2)^4)/d

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\cos \left (c+d\,x\right )}^5\,\left (\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^{3/2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^5*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(3/2),x)

[Out]

int(cos(c + d*x)^5*(B/cos(c + d*x) + C/cos(c + d*x)^2)*(a + a/cos(c + d*x))^(3/2), x)

________________________________________________________________________________________